<?php
function FillForm($str)
{
	global $TeamBool;
	if($TeamBool) return $str;
	return "";
}
function myMQpro($obj)
{
	return mysql_real_escape_string(trim($obj)); 
}
function SqlToHtml($str)
{return htmlspecialchars(stripslashes($str));}

function If_Require($Ckind)
{
	if($Ckind == 0) echo 'class="req"';
	else echo"";
}
function If_Star($Ckind)
{
	if($Ckind == 0) echo '<font color=red>*</font>';
	else echo"";
}
function if_reg_ing($SRtime, $ERtime, $now)
{
	if ($now>$ERtime) echo "<span class=red>Ended</span>";
	else if ($now<$SRtime) echo "<span class=red>Not Started</span>";
	else echo "<span class=red>Registering</span>";
}
?>



<script language="javascript">
var t = null;
t = setTimeout(time,1000);
function str0(a)
{
    if(a<10) return "0";
    else return "";
}
function time()
{
    clearTimeout(t);
    var dt = new Date();
    var year = dt.getFullYear();
    var month = dt.getMonth() + 1;
    var day = dt.getDate();
    var hour = dt.getHours();
    var minute = dt.getMinutes();
    var sec = dt.getSeconds();
    if(sec < 10)
    var ts = "现在的时间为："+year+"年"+month+"月"+day+"日"+hour+"时"+minute+"分"+sec+"秒";
    document.getElementById("nowdate").innerHTML = year+"-"+str0(month)+month+"-"+str0(day)+day+" "+str0(hour)+hour+":"+str0(minute)+minute+":"+str0(sec)+sec;
    t = setTimeout(time,1000);              
}
</script>